<template>
  <el-row class="tac">
    <el-col :span="24">
      <h2 class="mb-2">系统菜单</h2>
      <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" >
        <el-sub-menu index="1">
          <template #title>
            <el-icon><location /></el-icon>
            <span>社区新闻</span>
          </template>
            <el-menu-item index="1-1" @click="newsone">近期热点</el-menu-item>
            <el-menu-item index="1-2" @click="newstwo">最近公告</el-menu-item>
            <el-menu-item index="1-2" @click="newsthree">社区趣闻</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="2">
            <template #title>
              <el-icon><setting /></el-icon>
              <span>服务</span>
            </template>
          <el-menu-item index="2-1" @click="serviceone">个人办事</el-menu-item>
          <el-menu-item index="2-2" @click="servicetwo">社区服务</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="3">
            <template #title>
              <el-icon><document /></el-icon>
              <span>互动交流</span>
            </template>
          <el-menu-item index="3-1" @click="interflowone">热线服务</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="4" disabled>
          <template #title>
            <el-icon><setting /></el-icon>
            <span>敬请期待</span>
          </template>
        </el-sub-menu>
      </el-menu>
    </el-col>
   </el-row>
</template>

<script>
export default {
  data(){
    return{
      detail:[{
        pageSize: null,
        pageNum: null
      }]
    }
  },
  methods:{
    newsone(){
      this.$router.push("/hotpoint");

    },
    newstwo(){
      // this.$axios({
      //     method: "get",
      //     url: "http://localhost:8080/nav/static/newstwo"
      // }).then(res => {
      //     console.log(res);
      // })
    },
    newsthree(){
      // this.$axios({
      //     method: "get",
      //     url: "http://localhost:8080/nav/static/newsthree"
      // }).then(res => {
      //     console.log(res);
      // })
    },
    serviceone(){
      // this.$axios({
      //     method: "get",
      //     url: "http://localhost:8080/nav/static/serviceone"
      // }).then(res => {
      //     console.log(res);
      // })
    },
    servicetwo(){
      // this.$axios({
      //     method: "get",
      //     url:  "http://localhost:8080/nav/static/servicetwo"
      // }).then(res => {
      //     console.log(res);
      // })
    },
    interflowone(){
      // this.$axios({
      //     method: "get",
      //     url: "http://localhost:8080/nav/static/interflowone"
      // }).then(res => {
      //     console.log(res);
      // })
    },

  }
}

</script>

<style scoped>
    .el-sub-menu{
    margin-top: 15px;
  }
  .mb-2{
    margin-left: 80px;
    margin-top: 50px;
  }
  span{
    margin-left: 20px;
    font-size: 18px;
  }
  .el-icon{
    margin-left: 50px;
    margin-right: -8px;
  }
  .el-menu-item{
    margin-left: 70px;
    font-size: 16px;
  }
</style>